import Mock from 'mockjs'

//图表数据
let list = []
export default {
   getStatisticalData:()=>{
     for(let i =0;i<7;i++){
       const data = Mock.mock({
            苹果:Mock.Random.float(100,8000,0,0),
            vivo:Mock.Random.float(100,8000,0,0),
            oppo:Mock.Random.float(100,8000,0,0),
            三星:Mock.Random.float(100,8000,0,0),
            小米:Mock.Random.float(100,8000,0,0),
            魅族:Mock.Random.float(100,8000,0,0),
       })
       list.push(data)
     }
     return{
       code:20000,
       data:{
         //饼图
         videoData:[
           {
             name:'苹果',
             value:8000,
           },
           {
            name:'vivo',
            value:7000,
           },
           {
            name:'oppo',
            value:6000,
           },
           {
            name:'三星',
            value:5000,
           },
           {
            name:'小米',
            value:7000,
           },
           {
            name:'魅族',
            value:3000,
           },
         ],
         userData:[
                {
                week:'周一',
                new:56,
                active:400
                },
                {
                week:'周二',
                new:17,
                active:558
                },
                {
                week:'周三',
                new:8,
                active:678
                },
               {
                week:'周四',
                new:38,
                active:888
               },
               {
                week:'周五',
                new:48,
                active:878
               },
               {
                week:'周六',
                new:68,
                active:478
               },
               {
                week:'周日',
                new:88,
                active:978
               },
           ],
           //折线图
           orderData:{
               date:['20191001','20191002','20191003','20191004','20191005','20191006','20191007'],
               data:list
           },
           // table 数据
           tableData:[
            {
               name:'oppo',
               todayBuy:100,
               monthBuy:300,
               totalBuy:800,
            },
            {
               name:'vivo',
               todayBuy:200,
               monthBuy:300,
               totalBuy:500,
            }, 
            {
               name:'phone',
               todayBuy:200,
               monthBuy:300,
               totalBuy:1000,
            }, 
            {
                name:'phone2',
                todayBuy:200,
                monthBuy:300,
                totalBuy:1000,
             }, 
             {
                name:'phone3',
                todayBuy:200,
                monthBuy:300,
                totalBuy:1000,
             }, 
             {
                name:'phone4',
                todayBuy:200,
                monthBuy:300,
                totalBuy:1000,
             },
             {
                name:'phone5',
                todayBuy:200,
                monthBuy:300,
                totalBuy:1000,
             },    
          ],
          // 首页支付里面的数据
          countData:[
            {
               name:'今日支付订单',
               value:1234,
               icon:'success',
               color:'#2ec7c9',
            },
            {
               name:'今日收藏订单',
               value:210,
               icon:'star-on',
               color:'#ffb980',
            },
            {
               name:'今日未支付订单',
               value:456,
               icon:'s-goods',
               color:'#5ab1ef',
            },
            {
               name:'本月支付订单',
               value:8888,
               icon:'success',
               color:'#2ec7c9',
            },
            {
               name:'本月收藏订单',
               value:7888,
               icon:'star-on',
               color:'#ffb980',
            },
            {
               name:'本月未支付订单',
               value:1234,
               icon:'s-goods',
               color:'#5ab1ef',
            },
          ],
       }
     }
   }
}